<template>
  <div>
    <el-divider />
    <h4>MG评分量表</h4>
    <el-form ref="form" :model="form" label-width="140px">
      <el-form-item label="得分">
        <el-input v-model="score" style="width:200px" disabled />
      </el-form-item>
      <el-form-item label="眼睑下垂（上视）">
        <el-radio-group v-model="form.eyelid">
          <el-radio :label="0">大于60</el-radio>
          <el-radio :label="1">11-60</el-radio>
          <el-radio :label="2">1-10</el-radio>
          <el-radio :label="3">小于1</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="复视（左右视）:">
        <el-radio-group v-model="form.diplopia">
          <el-radio :label="0">大于60</el-radio>
          <el-radio :label="1">11-60</el-radio>
          <el-radio :label="2">1-10</el-radio>
          <el-radio :label="3">小于1</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="闭目:">
        <el-radio-group v-model="form.close">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">闭合且能抵抗部分阻力</el-radio>
          <el-radio :label="2">闭合但不能抵抗阻力</el-radio>
          <el-radio :label="3">不能闭合</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="言语:">
        <el-radio-group v-model="form.speech">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">间断含糊或鼻音</el-radio>
          <el-radio :label="2">持续含糊或鼻音，可听清</el-radio>
          <el-radio :label="3">不能听清的言语</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="咀嚼:">
        <el-radio-group v-model="form.chew">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">硬食疲劳</el-radio>
          <el-radio :label="2">软食疲劳</el-radio>
          <el-radio :label="3">胃管</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="吞咽">
        <el-radio-group v-model="form.swallow">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">很少发生呛咳或吞咽困难</el-radio>
          <el-radio :label="2">经常发生吞咽困难或改变饮食</el-radio>
          <el-radio :label="3">胃管</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="呼吸:">
        <el-radio-group v-model="form.breathe">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">活动时气短</el-radio>
          <el-radio :label="2">安静时气短</el-radio>
          <el-radio :label="3">呼吸机</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="屈伸颈:">
        <el-radio-group v-model="form.flexibleNeck">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">轻度</el-radio>
          <el-radio :label="2">中度</el-radio>
          <el-radio :label="3">重度</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="肩部外展:">
        <el-radio-group v-model="form.shoulderOutfield">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">轻度</el-radio>
          <el-radio :label="2">中度</el-radio>
          <el-radio :label="3">重度</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="屈髋（平卧位）:">
        <el-radio-group v-model="form.pile">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">轻度</el-radio>
          <el-radio :label="2">中度</el-radio>
          <el-radio :label="3">重度</el-radio>
        </el-radio-group>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        eyelid: 0,
        diplopia: 0,
        close: 0,
        speech: 0,
        chew: 0,
        swallow: 0,
        breathe: 0,
        flexibleNeck: 0,
        shoulderOutfield: 0,
        pile: 0,
        pId: this.pId,
        id: ''
      }
    }
  },
  inject: [
    'pId'
  ],
  computed: {
    score() {
      var sum = Object.values(this.form).reduce((x, y) => x + y)
      return sum
    }
  }
}
</script>

<style>

</style>
